package com.jiaquyun.jcyx.entity

import com.jiaquyun.jcyx.app.JCApplication
import com.module.lemlin.http.HttpResponseData
import java.io.Serializable

data class OrderSubmitResponse(
    val data: OrderSubmit
) : HttpResponseData()

data class OrderSubmit(
    val order_amount: Double,
    val order_id: String,
    val order_sn: String
)

data class OrderListResponse(
    val data: MutableList<OrderList> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class OrderList(
    val create_time: Int,
    val createtime: String,
    val deal_type: Int,
    val id: Int,
    val order_amount: String,
    val order_goods: MutableList<OrderGood> = mutableListOf(),
    val order_sn: String,
    val order_status: String,
    val pay_status: String,
    val shipping_status: String,
    val shops: OrderShops,
    val total_goods_num: String
)

data class OrderGood(
    val goods_id: Int,
    val goods_name: String,
    val goods_num: Int,
    val goods_price: String,
    val image: String,
    val member_goods_price: String,
    val active_type: Int,
    val is_comment: String,
    val refund_status: String,
) : Serializable

data class OrderShops(
    val auto_cancel: Int,
    val id: Int,
    val shop_name: String,
    val shop_img: String,
    val shop_no: String
) : Serializable


data class OOrderDetailsResponse(
    val data: OrderDetails
) : HttpResponseData()

data class OrderDetails(
    val confirm_time: String,
    val consignee: String,
    val coupon_price: String,
    val create_time: Int,
    val createtime: String,
    val deal_type: Int,
    val discount_price: String,
    val full_address: String,
    val goods_price: String,
    val id: Int,
    val integral: Int,
    val integral_price: String,
    val lat: String,
    val lng: String,
    val mobile: String,
    val order_amount: String,
    val order_goods: MutableList<OrderGood> = mutableListOf(),
    val order_info: List<String>,
    val order_sn: String,
    val order_status: String,
    val pay_status: String,
    val pay_time: String,
    val rider: Any,
    val rider_comment: Int,
    val send_images: String,
    val shipping_price: String,
    val shipping_status: String,
    val shops: OrderShops,
    val total_amount: String,
    val total_goods_num: Int,
    val user_money: String,
    val user_note: String
) : Serializable


data class OrderPayResponse(
    val data: OrderPay
) : HttpResponseData()

data class OrderPay(
    val isNeedPay: Boolean,
    val payInfo: Any,
    val payType: String
)

data class PayInfo(
    val appid: String,
    val noncestr: String,
    val `package`: String,
    val partnerid: String,
    val prepayid: String,
    val sign: String,
    val timestamp: String
)

data class OrderData(
    val `$scheduled_delivery_time`: String? = null,
    val address_id: Int,
    val cart_list: CartId,
    val deal_type: Int,
    val is_deduction_money: Boolean,
    val is_deduction_score: Int,
    val shop_id: Int = "${JCApplication.userShops?.id ?: "55"}".toInt(),
    val user_note: String? = null
)

data class CartId(
    val cart_id: List<String>
)